#include <cstddef> // for nullptr
namespace nullability_NullReturnedFromNonnull {
    int global;
#ifndef _WIN32
    __attribute__((returns_nonnull)) void* getPtr(void* p);

    void* getPtr(void* p) {
        if (p) { // forgot to negate the condition
            return &global;
        }
        // Warning: nullptr returned from a function that is expected
        // to return a non-null value
        return p;
    }
#endif
}